//package linter.controller.TestController;
//
//import co.elastic.clients.elasticsearch.ElasticsearchClient;
//import co.elastic.clients.json.jackson.JacksonJsonpMapper;
//import co.elastic.clients.transport.ElasticsearchTransport;
//import co.elastic.clients.transport.rest_client.RestClientTransport;
//import io.swagger.annotations.Api;
//import lombok.extern.slf4j.Slf4j;
//import org.apache.http.Header;
//import org.apache.http.HttpHost;
//import org.apache.http.message.BasicHeader;
//import org.elasticsearch.client.RestClient;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
///**
// * @author 北煜
// */
//@RestController
//@Slf4j
//@Api("搜索引擎测试")
//@RequestMapping("/Search")
//public class SerachTestController {
//    private String serverUrl = "https://d7805480010a4710b6414e4b673ea1e2.us-central1.gcp.cloud.es.io:443";
//    private String apiKey = "A_5unmlvQXCSNk1Jx-MAeg";
//
//    RestClient restClient = RestClient
//            .builder(HttpHost.create(serverUrl))
//            .setDefaultHeaders(new Header[]{
//                    new BasicHeader("Authorization", "ApiKey " + apiKey)
//            })
//            .build();
//
//    ElasticsearchTransport transport = new RestClientTransport(
//            restClient, new JacksonJsonpMapper());
//
//    ElasticsearchClient esClient = new ElasticsearchClient(transport);
//}
